package com.sylar.happygps;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ChooseMapTypeActivity extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.choosemaptype);

		Button btn_title_left = (Button) findViewById(R.id.btn_title_left);
		btn_title_left.setVisibility(View.VISIBLE);
		btn_title_left.setText("约会地选择方式");
		btn_title_left.setOnClickListener(this);

		Button btn_not_nav_path = (Button) findViewById(R.id.btn_not_nav_path);
		btn_not_nav_path.setOnClickListener(this);
		Button btn_yet_nav_path = (Button) findViewById(R.id.btn_yet_nav_path);
		btn_yet_nav_path.setOnClickListener(this);

		View tv_title_name = findViewById(R.id.tv_title_name);
		tv_title_name.setVisibility(View.GONE);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_title_left:
			finish();
			break;
		case R.id.btn_not_nav_path:
			to_not_nav_path();
			break;
		case R.id.btn_yet_nav_path:
			to_yet_nav_path();
			break;
		}
	}

	private void to_not_nav_path() {
		Intent intent = new Intent(this,MapActivity.class);
		startActivity(intent);
		finish();
	}

	private void to_yet_nav_path() {
		Intent intent = new Intent(this,MapActivity.class);
		startActivity(intent);
		finish();
	}
}
